package com.qqtech.qquan.homemaking.model;

import java.math.BigDecimal;
import java.util.List;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.qqtech.core.common.util.TimeUtil;

@SuppressWarnings("serial")
public class HomemakingOrderVo extends HomemakingOrder{
	/**
	 * 优惠卷码
	 */
	private Integer couponUserId;
	
	/**
	 * 优惠金额
	 */
	private BigDecimal minusPrice;
	
	
	
	public Integer getCouponUserId() {
		return couponUserId;
	}

	public void setCouponUserId(Integer couponUserId) {
		this.couponUserId = couponUserId;
	}

	public BigDecimal getMinusPrice() {
		return minusPrice;
	}

	public void setMinusPrice(BigDecimal minusPrice) {
		this.minusPrice = minusPrice;
	}

	/**
	 * 订单详细
	 */
	private List<HomemakingOrderItemVo> homemakingOrderItemVos;

	/**
	 * 服务地址id
	 */
	private Integer addressId;

	/** 买家昵称 */
	private String buyerNick;
	
	/** 买家头像 */
	private String buyerLogo;
	
	/** 服务时间 */
	private String serviceTimeStr;
	
	/** 支付状态 */
	private Integer payStatus;
	
	/** 服务地址 */
	private String address;
	
	/** 付款类型OrderBasePayTypeDictEnum:1-货到付款;2-在线支付 */
	private Integer payType;
	
    /** 下单时候选择的时间 */
	private List<HomemakingTimeVo> homemakingTimeVos;
	
	public String getAddress() {
		return address;
	}
	
	public Integer getAddressId() {
		return addressId;
	}
	
	public String getBuyerLogo() {
		return buyerLogo;
	}
	
	public String getBuyerLogoFull() {
		return this.getFileDomain() + getBuyerLogo();
	}

	public String getBuyerNick() {
		return buyerNick;
	}
	public List<HomemakingOrderItemVo> getHomemakingOrderItemVos() {
		return homemakingOrderItemVos;
	}

	public List<HomemakingTimeVo> getHomemakingTimeVos() {
		return homemakingTimeVos;
	}

	public Integer getPayStatus() {
		return payStatus;
	}

	public Integer getPayType() {
		return payType;
	}

	public String getServiceTimeStr() {
		if (getServiceDateStr() != null && getServiceHourStr() != null) {
			serviceTimeStr = getServiceDateStr() + " " + getServiceHourStr();
		}
		return serviceTimeStr;
	}

	public String getStrDoneAt() {
		return TimeUtil.getStringTimeByFormat(getDoneAt(), "yyyy-MM-dd HH:mm");
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public void setAddressId(Integer addressId) {
		this.addressId = addressId;
	}

	public void setBuyerLogo(String buyerLogo) {
		this.buyerLogo = buyerLogo;
	}
	
	public void setBuyerNick(String buyerNick) {
		this.buyerNick = buyerNick;
	}
	public void setHomemakingOrderItemVos(
			List<HomemakingOrderItemVo> homemakingOrderItemVos) {
		this.homemakingOrderItemVos = homemakingOrderItemVos;
	}

	public void setHomemakingTimeVos(List<HomemakingTimeVo> homemakingTimeVos) {
		this.homemakingTimeVos = homemakingTimeVos;
	}

	public void setPayStatus(Integer payStatus) {
		this.payStatus = payStatus;
	}

	public void setPayType(Integer payType) {
		this.payType = payType;
	}

	public void setServiceTimeStr(String serviceTimeStr) {
		this.serviceTimeStr = serviceTimeStr;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this,
				ToStringStyle.MULTI_LINE_STYLE);
	}

}